﻿using System;
using System.Collections.Generic;
using System.Text;

namespace oceanho.webapi.factory.httpAttr
{
    /// <summary>
    /// 定义一个Attribute，标识此方法不支持Request调用
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
    public class UnAllowCallMethodAttribute : System.Attribute
    {
        internal const string defaultMessage = "不允许调用此方法";

        /// <summary>
        /// 定义一个Attribute，标识此方法不支持Request调用
        /// </summary>
        public UnAllowCallMethodAttribute()
            : this(defaultMessage)
        {
        }

        /// <summary>
        /// 定义一个Attribute，标识此方法不支持Request调用
        /// </summary>
        /// <param name="message">不允许调用的错误提示消息</param>
        public UnAllowCallMethodAttribute(string message)
        {
            this.Message = message;
        }

        /// <summary>
        /// 获取或设置一个值，该值表示不允许调用提示消息。
        /// </summary>
        public string Message { get; set; }
    }
}
